import ConcreteAnimal.ConcreteCat;
import ConcreteAnimal.ConcreteDog;
import IAnimal.ICat;
import IAnimal.IDog;

public class Main {
    public static void main(String[] args) {
        ICat cat=new ConcreteCat();
        IDog dog=new ConcreteDog();
        Adapter adapter=new Adapter();

        adapter.setCat(cat);
        adapter.setDog(dog);

        cat.cry();
        cat.action();
        cat=(ICat) adapter;
        cat.cry();

        dog.cry();
        dog.action();
        dog=(IDog) adapter;
        dog.action();
    }
}